#include "TopWidget.h"
#include <QApplication>
#include <QSurfaceFormat>
#include <QDebug>

int main(int argc, char *argv[])
{

    QApplication a(argc, argv);

    //set opengl formatand profile
    QSurfaceFormat format;

    format.setDepthBufferSize(24);
    format.setStencilBufferSize(8);
    format.setVersion(3, 3);
    format.setProfile(QSurfaceFormat::CoreProfile);
    QSurfaceFormat::setDefaultFormat(format);

    qDebug()<<"depthBufferSize = "<<format.depthBufferSize();
    qDebug()<<"stencilBufferSize = "<<format.stencilBufferSize();
    qDebug()<<"swapBehavior = "<<format.swapBehavior();
    qDebug()<<"opengl version = "<<format.version();

    TopWidget w;
    w.show();

    return a.exec();
}
